package org.mat.ipaas.ucenter.service.api.system;

import org.mat.framework.lang.dto.MatApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @Author scott
 * @since 2018-12-20
 */
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "common-rest-api")
public interface CommonRestAPI {

    /**
     * 文件上传统一方法
     * 
     * 
     * @return
     */
    @PostMapping(value = "/sys/common/upload")
    MatApiResponse<?> upload( ) throws Exception;

    /**
     * 预览图片&下载文件
     * 请求地址：http://localhost:8080/common/static/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
     *
     * 
     * 
     */
    @GetMapping(value = "/sys/common/static/**")
    void view( );

    /**
     * @功能：pdf预览Iframe
     * @param modelAndView
     * @return
     */
    @RequestMapping("/sys/common/pdf/pdfPreviewIframe")
    ModelAndView pdfPreviewIframe(ModelAndView modelAndView);

}
